// import 'package:f_demo_two/components/shop_list.dart';
import 'package:flutter/material.dart';

class MyApp16 extends StatelessWidget {
  const MyApp16({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        // 导航条
        appBar: AppBar(
          title: const Text('ListView使用',
              style: TextStyle(color: Colors.white, fontSize: 20)),
          backgroundColor: Colors.pink,
          centerTitle: true,
        ),
        // 主体区域
        body: ListView.separated(
            // 列表的每一项
            itemBuilder: (BuildContext context, int index) {
              return Container();
            },
            separatorBuilder: (BuildContext context, int index) {
              return Container(
                height: 1,
                margin: const EdgeInsets.only(left: 10, right: 10),
                child: const Divider(
                  height: 1,
                ),
              );
            },
            itemCount: 20));
  }
}
